<div class="doctor-speciality-row"> 
    <?php foreach ($doctorSpecialities as $doctorSpeciality): ?>
        <div class="doctor-speciality"><?php echo $doctorSpeciality->getSpeciality()->getName() ?></div>
    <?php endforeach; ?>
</div>